chore: pin agent-wallet withdrawal rounding and atomicity#1390
Conversation
|
Warning Review limit reached
More reviews will be available in 31 minutes and 18 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR updates the kwil-db dependency versions, clarifies BPS fee rounding behavior in migration 049 to use ROUND HALF-UP instead of truncation, and extends the MAA withdrawal test suite with three new test cases covering commission rounding validation, bridge-out atomicity, and multi-token ledger isolation. ChangesMAA Withdrawal BPS Rounding and Atomicity
Possibly related PRs
Suggested reviewers
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Time Submission Status
You can submit time with the command. Example: See available commands to help comply with our Guidelines. |
|
@holdex pr submit-time 4h |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/streams/maa/withdraw_test.go`:
- Around line 330-335: The test opens a transaction with platform.DB.BeginTx and
only calls spTx.Rollback explicitly at the end, risking leaked open transactions
on early returns; add a deferred rollback immediately after obtaining spTx
(e.g., defer func() { _ = spTx.Rollback(ctx) }()) so spTx is cleaned up on all
failure paths, keeping the existing explicit rollback/assertion at the end for
clarity; reference spTx and BeginTx to locate where to add the defer.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9f44dd78-8217-4f27-bd11-414e6f726596
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (4)
go.modinternal/migrations/049-maa-funding.sqltests/streams/maa/create_test.gotests/streams/maa/withdraw_test.go
resolves: https://github.com/truflation/website/issues/4038
Summary by CodeRabbit
Documentation
Tests
Dependencies